package com.zxl.yjb.adapter;

import com.zxl.yjb.bean.ShareMsgClassifyBean;

import java.util.ArrayList;

import q.rorbin.verticaltablayout.adapter.TabAdapter;
import q.rorbin.verticaltablayout.widget.ITabView;
import q.rorbin.verticaltablayout.widget.TabView;

public class ShareMsgTabAdapter implements TabAdapter {

    private ArrayList<ShareMsgClassifyBean> list;

    public ShareMsgTabAdapter(ArrayList<ShareMsgClassifyBean> list)
    {
        this.list = list;
    }

    @Override
    public int getCount() {
        return list.size();
    }

    @Override
    public ITabView.TabBadge getBadge(int position) {
        return null;
    }

    @Override
    public ITabView.TabIcon getIcon(int position) {
        return null;
    }

    @Override
    public ITabView.TabTitle getTitle(int position) {
        return new TabView.TabTitle.Builder()
                .setContent(list.get(position).getName())
                .setTextColor(0xFFFF4C00,0xFF000000)
                .build();
    }

    @Override
    public int getBackground(int position) {
        return -1;
    }
}
